﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs"
    Inherits="TotalSport.ChangePassword" Theme="default" %>

<%@ Register Src="~/Header.ascx" TagName="header" TagPrefix="uc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="Styles/Stylsheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function CheckPass() {
            var a;
            var r = confirm("Do you want close");
            if (r == true) {
                this.close();
            }
            else {
                this.window;
            }
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        <table class="CPMainTableClass" align="center">
            <tr>
                <td>
                    <uc:header runat="server" ID="aa" />
                </td>
            </tr>
          
                <tr>
                    <td>
                        <table align="center" cellpadding="3" cellspacing="3" class="CPMainMiddleTableClass"
                            border="0">
                            <tr>
                                <td colspan="3" style="padding-left: 0px; padding-bottom: 0px" align="left" valign="middle">
                                    <img src="Images/ChangePassword.png" height="53px" width="50px" />
                                    <asp:Label ID="lblCPassword" runat="server" Text="Change Password" CssClass="lableChangepasswordform"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <span id="SMessage" style="display: none" runat="server" class="spanMsgs"></span>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="LeftColumnWidth">
                                    <asp:Label ID="lblOPassword" runat="server" Text="Old Password" CssClass="lableform"></asp:Label>
                                </td>
                                <td class="MiddleColumnWidth">
                                    :
                                </td>
                                <td class="RightColumnWidth">
                                    <asp:TextBox ID="txtOldPassword" runat="server" MaxLength="20" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please Enter Old Password"
                                        ControlToValidate="txtOldPassword" CssClass="validators" Display="None" ValidationGroup="btnSubmit"></asp:RequiredFieldValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="RequiredFieldValidator1">
                                    </asp:ValidatorCalloutExtender>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="LeftColumnWidth">
                                    <asp:Label ID="lblNPassword" runat="server" Text="New Password" CssClass="lableform"></asp:Label>
                                </td>
                                <td class="MiddleColumnWidth">
                                    :
                                </td>
                                <td class="RightColumnWidth">
                                    <asp:TextBox ID="txtNewPassword" runat="server" MaxLength="20" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please Enter New Password"
                                        ControlToValidate="txtNewPassword" CssClass="validators" Display="None" ValidationGroup="btnSubmit"></asp:RequiredFieldValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="RequiredFieldValidator2">
                                    </asp:ValidatorCalloutExtender>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="None"
                                        CssClass=" validators" ErrorMessage="Password length minimum: 7 & alphanumeric characters required."
                                        ControlToValidate="txtNewPassword" ValidationGroup="btnSubmit" ValidationExpression="(?!^[0-9]*$)(?!^[a-z]*$)^([a-z0-9@\$]{8,20})$"></asp:RegularExpressionValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" TargetControlID="RegularExpressionValidator1">
                                    </asp:ValidatorCalloutExtender>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="LeftColumnWidth">
                                    <asp:Label ID="lblRNewPassword" runat="server" Text="Re-Type New Password" CssClass="lableform"></asp:Label>
                                </td>
                                <td class="MiddleColumnWidth">
                                    :
                                </td>
                                <td class="RightColumnWidth">
                                    <asp:TextBox ID="txtReNewPassword" runat="server" MaxLength="20" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Please Re-type New Password"
                                        ControlToValidate="txtReNewPassword" CssClass="validators" ValidationGroup="btnSubmit" Display="None"></asp:RequiredFieldValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" TargetControlID="RequiredFieldValidator3">
                                    </asp:ValidatorCalloutExtender>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="None"
                                        CssClass=" validators" ErrorMessage="Password length minimum: 7 & alphanumeric characters required."
                                        ControlToValidate="txtReNewPassword" ValidationGroup="btnSubmit" ValidationExpression="(?!^[0-9]*$)(?!^[a-z]*$)^([a-z0-9@\$]{8,20})$"></asp:RegularExpressionValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" TargetControlID="RegularExpressionValidator2">
                                    </asp:ValidatorCalloutExtender>
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" CssClass=" validators"
                                        Display="None" ErrorMessage="Password Mismatch" ValidationGroup="btnSubmit" ControlToCompare="txtNewPassword"
                                        ControlToValidate="txtReNewPassword"></asp:CompareValidator>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" TargetControlID="CompareValidator1">
                                    </asp:ValidatorCalloutExtender>
                                </td>
                            </tr>
                            <tr>
                                <td style="padding-left: 120px">
                                    <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="btnnewclass" ValidationGroup="btnSubmit" OnClick="btnSave_Click" />
                                </td>
                                <td align="center" colspan="2">
                                    <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="btnnewclass" OnClick="btnReset_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btnnewclass" OnClientClick="CheckPass()" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
        </table>
    </div>
    </form>
</body>
</html>
